
import  React from 'react'

export default  class  App  extends React.Component {



    componentDidMount() {
        console.log(this.props)

        // this.props.myAdd()
    }


    render() {
        // let {count}=this.props

        return(

            <div>
                <h3>App 组件</h3>
                <div>  state里面的值:  {this.props.count}</div>
                {/* 第一种写法 */}
                <button   onClick={()=>this.props.myAdd()}>点击++</button>
            </div>
        )
    }
}